<!DOCTYPE html>


<html lang="en">
  

    <head>
      <meta charset="utf-8" />
        
      <meta name="description" content="時光的个人博客" />
      
      <meta
        name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1"
      />
	  <meta name="referrer" content="no-referrer" />

      <title>搭建自定义导航网站 |  時光</title>
  <meta name="generator" content="hexo-theme-ayer">
      
      <link rel="shortcut icon" href="/favicon.ico" />
       
<link rel="stylesheet" href="/dist/main.css">

      
<link rel="stylesheet" href="/css/fonts/remixicon.css">

      
<link rel="stylesheet" href="/css/custom.css">
 
      <script src="https://cdn.staticfile.org/pace/1.2.4/pace.min.js"></script>
       
 

      <link
        rel="stylesheet"
        href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-bulma@5.0.1/bulma.min.css"
      />
      <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>

      <!-- mermaid -->
      
      <style>
        .swal2-styled.swal2-confirm {
          font-size: 1.6rem;
        }
      </style>
    <link rel="alternate" href="/atom.xml" title="時光" type="application/atom+xml">
</head>
  </html>
</html>


<body>
  <div id="app">
    
      
    <main class="content on">
      <section class="outer">
  <article
  id="post-搭建自定义导航网站"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h1 class="article-title sea-center" style="border-left:0" itemprop="name">
  搭建自定义导航网站
</h1>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/12/05/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%AE%9A%E4%B9%89%E5%AF%BC%E8%88%AA%E7%BD%91%E7%AB%99/" class="article-date">
  <time datetime="2023-12-05T14:31:06.444Z" itemprop="datePublished">2023-12-05</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程</a>
  </div>
  
<div class="word_count">
    <span class="post-time">
        <span class="post-meta-item-icon">
            <i class="ri-quill-pen-line"></i>
            <span class="post-meta-item-text"> Word count:</span>
            <span class="post-count">1k</span>
        </span>
    </span>

    <span class="post-time">
        &nbsp; | &nbsp;
        <span class="post-meta-item-icon">
            <i class="ri-book-open-line"></i>
            <span class="post-meta-item-text"> Reading time≈</span>
            <span class="post-count">4 min</span>
        </span>
    </span>
</div>
 
    </div>
      
    <div class="tocbot"></div>




  
    <div class="article-entry" itemprop="articleBody">
       
  <p>免费版地址<br><a target="_blank" rel="noopener" href="https://www.iotheme.cn/store/webstack.html">https://www.iotheme.cn/store/webstack.html</a></p>
<p>付费版购买地址<br><a target="_blank" rel="noopener" href="https://www.iotheme.cn/store/onenav.html">https://www.iotheme.cn/store/onenav.html</a></p>
<p>Webstack项目地址：<a target="_blank" rel="noopener" href="https://github.com/HCLonely/hexo-theme-webstack">https://github.com/HCLonely/hexo-theme-webstack</a></p>
<p>其他主题推荐</p>
<p>TwoNav主题：<a target="_blank" rel="noopener" href="https://github.com/tznb1/TwoNav">https://github.com/tznb1/TwoNav</a></p>
<h1 id="一、安装宝塔面板"><a href="#一、安装宝塔面板" class="headerlink" title="一、安装宝塔面板"></a>一、安装宝塔面板</h1><p>宝塔官网：<a target="_blank" rel="noopener" href="https://www.bt.cn/new/download.html">https://www.bt.cn/new/download.html</a></p>
<h2 id="Centos安装脚本"><a href="#Centos安装脚本" class="headerlink" title="Centos安装脚本"></a><strong>Centos安装脚本</strong></h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum install -y wget &amp;&amp; wget -O install.sh https://download.bt.cn/install/install_6.0.sh &amp;&amp; sh install.sh ed8484bec</span><br></pre></td></tr></table></figure>

<h2 id="Ubuntu-x2F-Deepin安装脚本"><a href="#Ubuntu-x2F-Deepin安装脚本" class="headerlink" title="Ubuntu&#x2F;Deepin安装脚本"></a><strong>Ubuntu&#x2F;Deepin安装脚本</strong></h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wget -O install.sh https://download.bt.cn/install/install-ubuntu_6.0.sh &amp;&amp; sudo bash install.sh ed8484bec</span><br></pre></td></tr></table></figure>

<h2 id="Debian安装脚本"><a href="#Debian安装脚本" class="headerlink" title="Debian安装脚本"></a><strong>Debian安装脚本</strong></h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wget -O install.sh https://download.bt.cn/install/install-ubuntu_6.0.sh &amp;&amp; bash install.sh ed8484bec</span><br></pre></td></tr></table></figure>

<h2 id="万能安装脚本"><a href="#万能安装脚本" class="headerlink" title="万能安装脚本"></a><strong>万能安装脚本</strong></h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">if [ -f /usr/bin/curl ];then curl -sSO https://download.bt.cn/install/install_panel.sh;else wget -O install_panel.sh https://download.bt.cn/install/install_panel.sh;fi;bash install_panel.sh ed8484bec</span><br></pre></td></tr></table></figure>

<h2 id="国产龙芯架构安装脚本（其他CPU请勿使用）"><a href="#国产龙芯架构安装脚本（其他CPU请勿使用）" class="headerlink" title="国产龙芯架构安装脚本（其他CPU请勿使用）"></a><strong>国产龙芯架构安装脚本（其他CPU请勿使用）</strong></h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wget -O install_panel.sh https://download.bt.cn/install/0/loongarch64/loongarch64_install_panel.sh &amp;&amp; bash install_panel.sh ed8484bec</span><br></pre></td></tr></table></figure>

<p>安装完成后会提示访问地址及用户密码</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231206214426925-781740990.png" alt="image-20231206214422816"></p>
<p>输入 <code>bt </code> 可查看宝塔面板相关命令</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212154329963-803845647.png" alt="image-20231212154330290"></p>
<h1 id="二、安装基础服务"><a href="#二、安装基础服务" class="headerlink" title="二、安装基础服务"></a>二、安装基础服务</h1><p>需安装 Nginx、Mysql（建议5.7及以上版本）、PHP</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231205225047071-1102407633.png" alt="image-20231205225027722"></p>
<h2 id="三、安装wordpress服务"><a href="#三、安装wordpress服务" class="headerlink" title="三、安装wordpress服务"></a>三、安装wordpress服务</h2><h2 id="1、设置域名"><a href="#1、设置域名" class="headerlink" title="1、设置域名"></a>1、设置域名</h2><p>安装前可以先配置下域名，添加一条www的A记录</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207130426491-2053203062.png" alt="image-20231207130419098"></p>
<h2 id="2、添加站点"><a href="#2、添加站点" class="headerlink" title="2、添加站点"></a>2、添加站点</h2><p>在宝塔面板添加站点，域名用刚才添加的域名，没有域名可直接用主机ip</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207130507881-1515336514.png" alt="image-20231207130505865"></p>
<p>站点创建成功后会再次弹框确认数据账号及密码，可写个文档记录起来</p>
<h2 id="3、上传资源文件"><a href="#3、上传资源文件" class="headerlink" title="3、上传资源文件"></a>3、上传资源文件</h2><p>点击根目录链接进入根目录</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207130649488-1609283702.png" alt="image-20231207130647519"></p>
<p>清空该目录内所用文件并上传wordpress安装文件</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207130746013-1540082662.png" alt="image-20231207130743255"></p>
<p>上传完成后将文件进行解压</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207130836253-302310668.png" alt="image-20231207130833960"></p>
<p>解压后可以将原来的压缩包删除，然后将解压后的所有文件全选剪切到根目录</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207130940939-746758842.png" alt="image-20231207130938113"></p>
<p>粘贴后可以将原来的wordpress空目录删除，所有文件在站点根目录同一级</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207131106123-1424813966.png" alt="image-20231207131103899"></p>
<p>此时通过域名及端口已能正常访问</p>
<p>若不能正常访问许检查80、443端口是否冲突，安全组是否放行所需端口，Nginx服务启动是否正常</p>
<p>若无以上错误，可尝试申请ssl证书后重新访问</p>
<h2 id="4、开启伪静态"><a href="#4、开启伪静态" class="headerlink" title="4、开启伪静态"></a>4、开启伪静态</h2><p>设置伪静态能提高网站检索权重</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207131535847-2120931197.png" alt="image-20231207131532237"></p>
<h2 id="5、设置SSL证书"><a href="#5、设置SSL证书" class="headerlink" title="5、设置SSL证书"></a>5、设置SSL证书</h2><p>申请 <code>Let&#39;s Encrypt</code> 免费证书</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231207131712914-292456289.png" alt="image-20231207131710560"></p>
<p>申请成功如下所示</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212153257314-251334608.png" alt="image-20231212153257736"></p>
<p>若证书申请失败，如图所示</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212153504902-1087186006.png" alt="image-20231212153505277"></p>
<p>仍需检查 所需端口是否被占用，一般为80，443端口</p>
<p>另外需检查Nginx配置是否添加站点server配置，若未添加需手动添加</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212152858112-1453010230.png" alt="image-20231212152858330"></p>
<h1 id="三、安装wordpress"><a href="#三、安装wordpress" class="headerlink" title="三、安装wordpress"></a>三、安装wordpress</h1><h2 id="1、选择使用语言"><a href="#1、选择使用语言" class="headerlink" title="1、选择使用语言"></a>1、选择使用语言</h2><p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231210183513480-1920467402.png" alt="image-20231210183513608"></p>
<h2 id="2、关联数据库"><a href="#2、关联数据库" class="headerlink" title="2、关联数据库"></a>2、关联数据库</h2><p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231210183945593-1548832551.png" alt="image-20231210183945886"></p>
<h2 id="3、执行安装程序"><a href="#3、执行安装程序" class="headerlink" title="3、执行安装程序"></a>3、执行安装程序</h2><p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231210184331574-24565961.png" alt="image-20231210184331851"></p>
<h2 id="4、设置站点信息"><a href="#4、设置站点信息" class="headerlink" title="4、设置站点信息"></a>4、设置站点信息</h2><p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231210184425019-425292561.png" alt="image-20231210184425231"></p>
<p>安装完成后会自动跳转到后台管理界面，管理界面地址： <code>域名或ip/wp-admin</code></p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231210184732005-547247474.png" alt="image-20231210184732241"></p>
<h1 id="四、导航站主题配置"><a href="#四、导航站主题配置" class="headerlink" title="四、导航站主题配置"></a>四、导航站主题配置</h1><h2 id="1、安装主题"><a href="#1、安装主题" class="headerlink" title="1、安装主题"></a>1、安装主题</h2><p>外观 -&gt; 添加新主题 -&gt; 上传主题 -&gt; 上传主题</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231211235404755-736567806.png" alt="image-20231211235358818"></p>
<p>安装好后如下所示，点击启用即可</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212001313462-1821521391.png" alt="image-20231212001308445"></p>
<p>启用后会多出 网址 一栏</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212001517506-1918188951.png" alt="image-20231212001500908"></p>
<h2 id="2、安装插件"><a href="#2、安装插件" class="headerlink" title="2、安装插件"></a>2、安装插件</h2><p>插件 &#x3D;&gt; 添加新插件 &#x3D;&gt; 上传插件，需安装 <code>redis-cache</code>  和 <code>wp-rocket</code> 插件，先不要启用</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212001657276-1669673131.png" alt="image-20231212001641534"></p>
<p>宝塔面板 &#x3D;&gt; 软件商店 &#x3D;&gt;  已安装  &#x3D;&gt; PHP &#x3D;&gt; 设置 &#x3D;&gt; 安装拓展  安装 <code>opcache</code> 和  <code>redis</code> 拓展 </p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212002242404-1512309611.png" alt="image-20231212002226489"></p>
<p>插件 &#x3D;&gt; 已安装插件 &#x3D;&gt;  启用刚才上传的两个插件</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212002953247-1411174404.png" alt="image-20231212002946507"></p>
<h2 id="3、修改链接结构"><a href="#3、修改链接结构" class="headerlink" title="3、修改链接结构"></a>3、修改链接结构</h2><p>设置 &#x3D;&gt; 固定连接 &#x3D;&gt;  固定链接结构 &#x3D;&gt; 自定义结构，设置为 <code>/%post_id%.html</code></p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212003351689-2050304142.png" alt="image-20231212003336337"></p>
<p>此时使用ip 或者域名就可以访问了</p>
<p><img src="C:/Users/shiguang/AppData/Roaming/Typora/typora-user-images/image-20231212003701150.png" alt="image-20231212003701150"></p>
<h2 id="4、基本功能"><a href="#4、基本功能" class="headerlink" title="4、基本功能"></a>4、基本功能</h2><p>网址 &#x3D;&gt; 网址分类</p>
<p>填写名称，描述，选择菜单图标，添加新网址目录</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212010114639-1719071349.png" alt="image-20231212010057790"></p>
<p>网址 &#x3D;&gt; 添加网址</p>
<p>填写标题，描述，网址连接，图标路径，选择网址分类目录，发布即可</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212004857060-639422935.png" alt="image-20231212004852382"></p>
<p>添加后如下所示</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212005123156-942049595.png" alt="image-20231212005108353"></p>
<p>其他更多配置可在主题设置进行调整</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212005428556-1422541523.png" alt="image-20231212005413041"></p>
<h2 id="5、移除Fork-me-on-GitHub图标"><a href="#5、移除Fork-me-on-GitHub图标" class="headerlink" title="5、移除Fork me on GitHub图标"></a>5、移除<code>Fork me on GitHub</code>图标</h2><p>回到宝塔面板，进入站点根目录，找到 <code>/templates/header-banner.php</code> 文件，双击进行编辑</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212005813219-1522323104.png" alt="image-20231212005758285"></p>
<p>删除最后一段a链接保存即可</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202312/2233039-20231212005935545-237471220.png" alt="image-20231212005929617"></p>
 
      <!-- reward -->
      
      <div id="reword-out">
        <div id="reward-btn">
          Donate
        </div>
      </div>
      
    </div>
    

    <!-- copyright -->
    
    <div class="declare">
      <ul class="post-copyright">
        <li>
          <i class="ri-copyright-line"></i>
          <strong>Copyright： </strong>
          
          Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
          
        </li>
      </ul>
    </div>
    
    <footer class="article-footer">
       
<div class="share-btn">
      <span class="share-sns share-outer">
        <i class="ri-share-forward-line"></i>
        分享
      </span>
      <div class="share-wrap">
        <i class="arrow"></i>
        <div class="share-icons">
          
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="ri-weibo-fill"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="ri-wechat-fill"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="ri-qq-fill"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="ri-douban-line"></i>
          </a>
          <!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a> -->
          
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="ri-facebook-circle-fill"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="ri-twitter-fill"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="ri-google-fill"></i>
          </a>
        </div>
      </div>
</div>

<div class="wx-share-modal">
    <a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=http://example.com/2023/12/05/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%AE%9A%E4%B9%89%E5%AF%BC%E8%88%AA%E7%BD%91%E7%AB%99/" alt="微信分享二维码">
    </div>
</div>

<div id="share-mask"></div>  
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/wordpress/" rel="tag">wordpress</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%AE%9D%E5%A1%94%E9%9D%A2%E6%9D%BF/" rel="tag">宝塔面板</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%AF%BC%E8%88%AA/" rel="tag">导航</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%BB%BA%E7%AB%99/" rel="tag">建站</a></li></ul>

    </footer>
  </div>

   
  <nav class="article-nav">
    
      <a href="/2023/12/09/%E5%AE%9D%E5%A1%94%E9%9D%A2%E6%9D%BF%E7%94%B3%E8%AF%B7ssl%E6%97%B6%E5%9F%9F%E5%90%8D%E8%A7%A3%E6%9E%90%E9%94%99%E8%AF%AF%E6%88%96%E9%AA%8C%E8%AF%81URL%E6%97%A0%E6%B3%95%E8%A2%AB%E8%AE%BF%E9%97%AE/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            宝塔面板申请ssl时域名解析错误或验证URL无法被访问!
          
        </div>
      </a>
    
    
      <a href="/2023/12/03/%E5%85%8D%E8%B4%B9%E9%A2%86%E5%8F%96%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">免费领取云服务器</div>
      </a>
    
  </nav>

   
<!-- valine评论 -->
<div id="vcomments-box">
  <div id="vcomments"></div>
</div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="https://cdn.staticfile.org/valine/1.4.16/Valine.min.js"></script>
<script>
  new Valine({
    el: "#vcomments",
    app_id: "dx3B54wOwhi75vxC2IAZagtg-gzGzoHsz",
    app_key: "m4k2fhnFa1iPI4vbofHqMY5X",
    path: window.location.pathname,
    avatar: "monsterid",
    placeholder: "给我的文章加点评论吧~",
    recordIP: true,
  });
  const infoEle = document.querySelector("#vcomments .info");
  if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
    infoEle.childNodes.forEach(function (item) {
      item.parentNode.removeChild(item);
    });
  }
</script>
<style>
  #vcomments-box {
    padding: 5px 30px;
  }

  @media screen and (max-width: 800px) {
    #vcomments-box {
      padding: 5px 0px;
    }
  }

  #vcomments-box #vcomments {
    background-color: #fff;
  }

  .v .vlist .vcard .vh {
    padding-right: 20px;
  }

  .v .vlist .vcard {
    padding-left: 10px;
  }
</style>

 
   
  
   
    <script src="https://cdn.staticfile.org/twikoo/1.4.18/twikoo.all.min.js"></script>
    <div id="twikoo" class="twikoo"></div>
    <script>
        twikoo.init({
            envId: ""
        })
    </script>
 
</article>

</section>
      <footer class="footer">
  <div class="outer">
    <ul>
      <li>
        Copyrights &copy;
        2023
        <i class="ri-heart-fill heart_icon"></i> Shiguang
      </li>
    </ul>
    <ul>
      <li>
        
      </li>
    </ul>
    <ul>
      <li>
        
        
        <span>
  <span><i class="ri-user-3-fill"></i>Visitors:<span id="busuanzi_value_site_uv"></span></span>
  <span class="division">|</span>
  <span><i class="ri-eye-fill"></i>Views:<span id="busuanzi_value_page_pv"></span></span>
</span>
        
      </li>
    </ul>
    <ul>
      
    </ul>
    <ul>
      
    </ul>
    <ul>
      <li>
        <!-- cnzz统计 -->
        
        <script type="text/javascript" src='https://s9.cnzz.com/z_stat.php?id=1278069914&amp;web_id=1278069914'></script>
        
      </li>
    </ul>
  </div>
</footer>    
    </main>
    <div class="float_btns">
      <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>

<div class="todark" id="todark">
  <i class="ri-moon-line"></i>
</div>

    </div>
    <aside class="sidebar on">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ayer-side.svg" alt="時光"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/friends">友链</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
      <a class="nav-item-link" target="_blank" href="/atom.xml" title="RSS Feed">
        <i class="ri-rss-line"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
    
<script src="/js/jquery-3.6.0.min.js"></script>
 
<script src="/js/lazyload.min.js"></script>

<!-- Tocbot -->
 
<script src="/js/tocbot.min.js"></script>

<script>
  tocbot.init({
    tocSelector: ".tocbot",
    contentSelector: ".article-entry",
    headingSelector: "h1, h2, h3, h4, h5, h6",
    hasInnerContainers: true,
    scrollSmooth: true,
    scrollContainer: "main",
    positionFixedSelector: ".tocbot",
    positionFixedClass: "is-position-fixed",
    fixedSidebarOffset: "auto",
  });
</script>

<script src="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.js"></script>
<link
  rel="stylesheet"
  href="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.css"
/>
<script src="https://cdn.staticfile.org/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>

<script src="/dist/main.js"></script>

<!-- ImageViewer -->
 <!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>

<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.css">
<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/default-skin/default-skin.min.css">
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.js"></script>
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe-ui-default.min.js"></script>

<script>
    function viewer_init() {
        let pswpElement = document.querySelectorAll('.pswp')[0];
        let $imgArr = document.querySelectorAll(('.article-entry img:not(.reward-img)'))

        $imgArr.forEach(($em, i) => {
            $em.onclick = () => {
                // slider展开状态
                // todo: 这样不好，后面改成状态
                if (document.querySelector('.left-col.show')) return
                let items = []
                $imgArr.forEach(($em2, i2) => {
                    let img = $em2.getAttribute('data-idx', i2)
                    let src = $em2.getAttribute('data-target') || $em2.getAttribute('src')
                    let title = $em2.getAttribute('alt')
                    // 获得原图尺寸
                    const image = new Image()
                    image.src = src
                    items.push({
                        src: src,
                        w: image.width || $em2.width,
                        h: image.height || $em2.height,
                        title: title
                    })
                })
                var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, {
                    index: parseInt(i)
                });
                gallery.init()
            }
        })
    }
    viewer_init()
</script> 
<!-- MathJax -->

<!-- Katex -->

<!-- busuanzi  -->
 
<script src="/js/busuanzi-2.3.pure.min.js"></script>
 
<!-- ClickLove -->

<!-- ClickBoom1 -->

<!-- ClickBoom2 -->

<!-- CodeCopy -->
 
<link rel="stylesheet" href="/css/clipboard.css">
 <script src="https://cdn.staticfile.org/clipboard.js/2.0.10/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="ri-file-copy-2-line"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-checkbox-circle-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-checkbox-circle-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-time-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-time-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>
 
<!-- CanvasBackground -->

<script>
  if (window.mermaid) {
    mermaid.initialize({ theme: "forest" });
  }
</script>


    
    

  </div>
</body>

</html>